﻿using System;
using System.Collections.Generic;
using System.Linq;
using Domain.Models;

namespace Web.Logic.Models
{
    public class FilterUnit
    {
        private string field;
        private MathSign sign;
        private object value;
        private Func<Doer, bool> expr;

        public FilterUnit(Func<Doer, bool> expr)
        {
            this.expr = expr;
        }

        public IEnumerable<Doer> Filter(IEnumerable<Doer> doers)
        {
            return doers.Where(expr);
        }
    }
}